from pydantic import BaseModel,EmailStr
from typing import Any

class UserBase(BaseModel):
    username:str
    email:EmailStr
    phone:str

class UserCreate(UserBase):
    password:str

class UserOut(UserBase):
    id: int

    class Config:
        from_attributes = True


class UserLogin(BaseModel):
    username: str
    password: str

class ApiResponse(BaseModel):
    code: str
    msg: str
    data: Any